
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>APT 原理剖析、详解 · 日常学习笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-footer-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Linux主机、虚拟机和docker网络配置.html" />
    
    
    <link rel="prev" href="Linux各种安装下载慢解决方法.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"buttons":[{"user":"Xiechengqi","repo":"LearningNotes","type":"star","size":"small","count":true}]};
    </script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../网络学习资源整理/">
            
                <a href="../网络学习资源整理/">
            
                    
                    网络学习资源整理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../网络学习资源整理/技术学习.html">
            
                <a href="../网络学习资源整理/技术学习.html">
            
                    
                    技术学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../网络学习资源整理/运维博客.html">
            
                <a href="../网络学习资源整理/运维博客.html">
            
                    
                    运维博客
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../网络学习资源整理/工具.html">
            
                <a href="../网络学习资源整理/工具.html">
            
                    
                    工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../网络学习资源整理/静态博客模板.html">
            
                <a href="../网络学习资源整理/静态博客模板.html">
            
                    
                    静态博客模板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../网络学习资源整理/静态网站pages服务.html">
            
                <a href="../网络学习资源整理/静态网站pages服务.html">
            
                    
                    静态网站pages服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../网络学习资源整理/静态pages的CI和CD.html">
            
                <a href="../网络学习资源整理/静态pages的CI和CD.html">
            
                    
                    静态pages的CI和CD
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../网络学习资源整理/Hugo学习.html">
            
                <a href="../网络学习资源整理/Hugo学习.html">
            
                    
                    Hugo学习
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../心灵鸡汤/">
            
                <a href="../心灵鸡汤/">
            
                    
                    心灵鸡汤
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../心灵鸡汤/心灵鸡汤.html">
            
                <a href="../心灵鸡汤/心灵鸡汤.html">
            
                    
                    语录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="./">
            
                <a href="./">
            
                    
                    Linux
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="Linux常用命令.html">
            
                <a href="Linux常用命令.html">
            
                    
                    Linux常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="Linux小知识.html">
            
                <a href="Linux小知识.html">
            
                    
                    平时 linux 遇到的问题解决办法和扩展小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="Linux性能相关常用命令.html">
            
                <a href="Linux性能相关常用命令.html">
            
                    
                    Linux性能相关常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="Linux各种安装下载慢解决方法.html">
            
                <a href="Linux各种安装下载慢解决方法.html">
            
                    
                    Linux各种安装下载慢解决方法
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.5" data-path="APT-剖析详解.html">
            
                <a href="APT-剖析详解.html">
            
                    
                    APT 原理剖析、详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="Linux主机、虚拟机和docker网络配置.html">
            
                <a href="Linux主机、虚拟机和docker网络配置.html">
            
                    
                    Linux 主机、虚拟机和docker网络配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="Linux文件系统学习.html">
            
                <a href="Linux文件系统学习.html">
            
                    
                    Linux文件系统学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="Linux用户和用户组管理.html">
            
                <a href="Linux用户和用户组管理.html">
            
                    
                    Linux用户和用户组管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="Linux用户增删改等学习.html">
            
                <a href="Linux用户增删改等学习.html">
            
                    
                    Linux用户增删改等学习.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="Linux程序存放目录.html">
            
                <a href="Linux程序存放目录.html">
            
                    
                    Linux程序存放目录.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11" data-path="Linux编译安装软件包详解.html">
            
                <a href="Linux编译安装软件包详解.html">
            
                    
                    Linux C/C++ 软件包编译、安装原理详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.12" data-path="SSH详解.html">
            
                <a href="SSH详解.html">
            
                    
                    SSH 详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.13" data-path="Tomcat和Ngnix和Apache.html">
            
                <a href="Tomcat和Ngnix和Apache.html">
            
                    
                    Tomcat和Ngnix和Apache.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.14" data-path="UbuntuSoftwareInstall.html">
            
                <a href="UbuntuSoftwareInstall.html">
            
                    
                    Ubuntu 软件包安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.15" data-path="YAML-配置文件语言.html">
            
                <a href="YAML-配置文件语言.html">
            
                    
                    YAML 配置文件语言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.16" data-path="bin目录详解.html">
            
                <a href="bin目录详解.html">
            
                    
                    bin目录详解.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.17" data-path="ffmpeg详解.html">
            
                <a href="ffmpeg详解.html">
            
                    
                    ffmpeg学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.18" data-path="trans命令.html">
            
                <a href="trans命令.html">
            
                    
                    trans命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.19" data-path="yum和rpm.html">
            
                <a href="yum和rpm.html">
            
                    
                    Yum 和 RPM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.20" data-path="从BashShell启动“窥探”Linux环境变量相关文件.html">
            
                <a href="从BashShell启动“窥探”Linux环境变量相关文件.html">
            
                    
                    Linux环境变量详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.21" data-path="新创建主机常用初始化配置.html">
            
                <a href="新创建主机常用初始化配置.html">
            
                    
                    新建主机常用初始化配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.22" data-path="正则表达式学习.html">
            
                <a href="正则表达式学习.html">
            
                    
                    正则表达式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.23" data-path="通过Linux开机启动项展开学习.html">
            
                <a href="通过Linux开机启动项展开学习.html">
            
                    
                    Linux开机启动项学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.24" data-path="防火墙学习.html">
            
                <a href="防火墙学习.html">
            
                    
                    防火墙学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Python/">
            
                <a href="../Python/">
            
                    
                    Python
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Python/BeautifulSoup.md">
            
                <span>
            
                    
                    Python3 BeautifulSoup 学习记录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../Python/Django.html">
            
                <a href="../Python/Django.html">
            
                    
                    Python Django 学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../Python/IPython使用技巧.html">
            
                <a href="../Python/IPython使用技巧.html">
            
                    
                    IPython 使用技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../Python/Numpy.html">
            
                <a href="../Python/Numpy.html">
            
                    
                    Python Numpy 学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../Python/Python小知识.html">
            
                <a href="../Python/Python小知识.html">
            
                    
                    Python 学习遇到的问题解决或扩展小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../Python/Python模块管理总结.html">
            
                <a href="../Python/Python模块管理总结.html">
            
                    
                    Python 模块管理总结
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="../Python/flask学习.md">
            
                <span>
            
                    
                    Flask 学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="../Python/matplotlib.html">
            
                <a href="../Python/matplotlib.html">
            
                    
                    matplotlib.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="../Python/re正则表达式.html">
            
                <a href="../Python/re正则表达式.html">
            
                    
                    re正则表达式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="../Python/图形界面学习.html">
            
                <a href="../Python/图形界面学习.html">
            
                    
                    图形界面学习.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.11" data-path="../Python/常用图像库学习.html">
            
                <a href="../Python/常用图像库学习.html">
            
                    
                    Python3 常用图像库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.12" data-path="../Python/进阶学习.html">
            
                <a href="../Python/进阶学习.html">
            
                    
                    Python3 进阶学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../Shell/">
            
                <a href="../Shell/">
            
                    
                    Shell
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../Shell/shell小知识.html">
            
                <a href="../Shell/shell小知识.html">
            
                    
                    Shell小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../Shell/Shell奇淫技巧.html">
            
                <a href="../Shell/Shell奇淫技巧.html">
            
                    
                    Shell奇淫技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../Shell/Linux文本操作三大利器-grep、sed、awk.html">
            
                <a href="../Shell/Linux文本操作三大利器-grep、sed、awk.html">
            
                    
                    grep、sed、awk 详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../Shell/Shell文本处理常用工具补遗.html">
            
                <a href="../Shell/Shell文本处理常用工具补遗.html">
            
                    
                    Shell文本处理常用工具补遗
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../Shell/句子解析.html">
            
                <a href="../Shell/句子解析.html">
            
                    
                    句子解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../Shell/识别是否是root用户.html">
            
                <a href="../Shell/识别是否是root用户.html">
            
                    
                    识别是否是root用户
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../Shell/识别系统.html">
            
                <a href="../Shell/识别系统.html">
            
                    
                    识别系统
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../Vim/">
            
                <a href="../Vim/">
            
                    
                    Vim
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../Vim/Vim小知识.html">
            
                <a href="../Vim/Vim小知识.html">
            
                    
                    Vim小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../Vim/Vim编辑器再学习.html">
            
                <a href="../Vim/Vim编辑器再学习.html">
            
                    
                    Vim编辑器再学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../Vim/VimScript学习笔记.html">
            
                <a href="../Vim/VimScript学习笔记.html">
            
                    
                    VimScript 学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../Vim/YouCompleteMe安装.html">
            
                <a href="../Vim/YouCompleteMe安装.html">
            
                    
                    YouCompleteMe安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="../Vim/vimrc示例1.html">
            
                <a href="../Vim/vimrc示例1.html">
            
                    
                    vimrc示例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="../Vim/vimrc备份.html">
            
                <a href="../Vim/vimrc备份.html">
            
                    
                    vimrc备份
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="../Vim/Tmux快捷键.html">
            
                <a href="../Vim/Tmux快捷键.html">
            
                    
                    Tmux快捷键
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../Ansible/">
            
                <a href="../Ansible/">
            
                    
                    Ansible
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../Ansible/术语表.html">
            
                <a href="../Ansible/术语表.html">
            
                    
                    术语表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../Ansible/Ansible必知单词.html">
            
                <a href="../Ansible/Ansible必知单词.html">
            
                    
                    Ansible 常用单词
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../Ansible/Ansible学习.html">
            
                <a href="../Ansible/Ansible学习.html">
            
                    
                    Ansible 学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../Ansible/Ansible常用模板.html">
            
                <a href="../Ansible/Ansible常用模板.html">
            
                    
                    Ansible常用模板.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../Docker/">
            
                <a href="../Docker/">
            
                    
                    Docker
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../Docker/Docker基础学习.html">
            
                <a href="../Docker/Docker基础学习.html">
            
                    
                    Docker 基础学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../Docker/Docker小知识.html">
            
                <a href="../Docker/Docker小知识.html">
            
                    
                    Docker 小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../Docker/Docker必知单词.html">
            
                <a href="../Docker/Docker必知单词.html">
            
                    
                    Docker 学习中的单词
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../Git/">
            
                <a href="../Git/">
            
                    
                    Git
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../Git/git学习.html">
            
                <a href="../Git/git学习.html">
            
                    
                    Git 学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../Git/git小技巧.html">
            
                <a href="../Git/git小技巧.html">
            
                    
                    Git 小技巧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../Zabbix/">
            
                <a href="../Zabbix/">
            
                    
                    Zabbix
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../Zabbix/Docker安装配置Zabbix.html">
            
                <a href="../Zabbix/Docker安装配置Zabbix.html">
            
                    
                    Docker 安装配置 Zabbix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../Zabbix/术语单词.html">
            
                <a href="../Zabbix/术语单词.html">
            
                    
                    Zabbix 中常用单词
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.3" data-path="../Zabbix/重置密码.html">
            
                <a href="../Zabbix/重置密码.html">
            
                    
                    重置 Zabbix 账户密码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../KVM/">
            
                <a href="../KVM/">
            
                    
                    KVM
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../KVM/安装配置.html">
            
                <a href="../KVM/安装配置.html">
            
                    
                    常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="../KVM/虚拟机网络配置.html">
            
                <a href="../KVM/虚拟机网络配置.html">
            
                    
                    Bridged 桥接模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../Mysql/">
            
                <a href="../Mysql/">
            
                    
                    Mysql
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../Mysql/Ubuntu安装Navicat.html">
            
                <a href="../Mysql/Ubuntu安装Navicat.html">
            
                    
                    Ubuntu 安装及配置 Navicat
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../Mysql/忘记root密码.html">
            
                <a href="../Mysql/忘记root密码.html">
            
                    
                    如何替换已忘记的 root 密码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../Nginx/">
            
                <a href="../Nginx/">
            
                    
                    Nginx
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="../Nginx/Nginx学习笔记.html">
            
                <a href="../Nginx/Nginx学习笔记.html">
            
                    
                    Nginx 学习
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../NoClass/">
            
                <a href="../NoClass/">
            
                    
                    闲知
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="../NoClass/容易读错的IT术语.html">
            
                <a href="../NoClass/容易读错的IT术语.html">
            
                    
                    容易读错的IT术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.2" data-path="../NoClass/Linux-electron-tutorial.html">
            
                <a href="../NoClass/Linux-electron-tutorial.html">
            
                    
                    Linux electron 学习记录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.3" data-path="../NoClass/MarkdownSkills.html">
            
                <a href="../NoClass/MarkdownSkills.html">
            
                    
                    记录 Markdown 的各种小技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.4" data-path="../NoClass/RaspeberryPi.html">
            
                <a href="../NoClass/RaspeberryPi.html">
            
                    
                    使用树莓派 3B 遇到的问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.5" data-path="../NoClass/华为国产手机芯片SoC.html">
            
                <a href="../NoClass/华为国产手机芯片SoC.html">
            
                    
                    华为国产手机芯片SoC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.6" data-path="../NoClass/图片格式详解及其对比.html">
            
                <a href="../NoClass/图片格式详解及其对比.html">
            
                    
                    图片格式详解及其对比
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.7" data-path="../NoClass/计算机小知识.html">
            
                <a href="../NoClass/计算机小知识.html">
            
                    
                    记录一些计算机的小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.8" data-path="../NoClass/诗词.html">
            
                <a href="../NoClass/诗词.html">
            
                    
                    诗词
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="../OS/">
            
                <a href="../OS/">
            
                    
                    OS
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.16.1" data-path="../OS/学习笔记.html">
            
                <a href="../OS/学习笔记.html">
            
                    
                    操作系统学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.2" data-path="../OS/术语单词.html">
            
                <a href="../OS/术语单词.html">
            
                    
                    OS 专业词语解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.3" data-path="../OS/SoCCPU.html">
            
                <a href="../OS/SoCCPU.html">
            
                    
                    SoC 与 CPU
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="../Tomcat/">
            
                <a href="../Tomcat/">
            
                    
                    Tomcat
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.17.1" data-path="../Tomcat/Tomcat 学习.html">
            
                <a href="../Tomcat/Tomcat 学习.html">
            
                    
                    Tomcat 学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.2" data-path="../Tomcat/Tomcat学习.html">
            
                <a href="../Tomcat/Tomcat学习.html">
            
                    
                    Tomcat 学习
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="../VPS/">
            
                <a href="../VPS/">
            
                    
                    VPS
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.18.1" data-path="../VPS/AWS_lightsail.html">
            
                <a href="../VPS/AWS_lightsail.html">
            
                    
                    AWS LightSail
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18.2" data-path="../VPS/GCP_VM实例创建和基本配置.html">
            
                <a href="../VPS/GCP_VM实例创建和基本配置.html">
            
                    
                    GCP VM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18.3" data-path="../VPS/ECS和VPS等等.html">
            
                <a href="../VPS/ECS和VPS等等.html">
            
                    
                    ECS和VPS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="../ComputerComposition/">
            
                <a href="../ComputerComposition/">
            
                    
                    ComputerComposition
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.19.1" data-path="../ComputerComposition/学习笔记.html">
            
                <a href="../ComputerComposition/学习笔记.html">
            
                    
                    计算机组成原理学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="../ComputerNetwork/">
            
                <a href="../ComputerNetwork/">
            
                    
                    ComputerNetwork
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.20.1" data-path="../ComputerNetwork/ProWords.html">
            
                <a href="../ComputerNetwork/ProWords.html">
            
                    
                    术语单词
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20.2" data-path="../ComputerNetwork/学习笔记.html">
            
                <a href="../ComputerNetwork/学习笔记.html">
            
                    
                    计算机网络学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20.3" data-path="../ComputerNetwork/小知识.html">
            
                <a href="../ComputerNetwork/小知识.html">
            
                    
                    学习计算机网络中的小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20.4" data-path="../NoClass/浏览器架构简析.md">
            
                <span>
            
                    
                    浏览器架构简析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.21" data-path="../毕业论文/">
            
                <a href="../毕业论文/">
            
                    
                    毕业论文
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.21.1" data-path="../毕业论文/开题报告.html">
            
                <a href="../毕业论文/开题报告.html">
            
                    
                    开题报告
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >APT 原理剖析、详解</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="apt-&#x539F;&#x7406;&#x5256;&#x6790;&#x3001;&#x8BE6;&#x89E3;"><a name="apt-&#x539F;&#x7406;&#x5256;&#x6790;&#x3001;&#x8BE6;&#x89E3;" class="plugin-anchor" href="#apt-&#x539F;&#x7406;&#x5256;&#x6790;&#x3001;&#x8BE6;&#x89E3;"><i class="fa fa-link" aria-hidden="true"></i></a>APT &#x539F;&#x7406;&#x5256;&#x6790;&#x3001;&#x8BE6;&#x89E3;</h1>
<blockquote>
<p>APT - Advanced Packaging Tool</p>
</blockquote>
<div align="center">
<img src="images/&#x8F6F;&#x4EF6;&#x5B89;&#x88C5;&#x65B9;&#x6CD5;&#x5386;&#x7A0B;.jpg"><br>&#x8F6F;&#x4EF6;&#x5B89;&#x88C5;&#x65B9;&#x6CD5;&#x5386;&#x7A0B;&#x56FE;
</div>



<p><img src="http://ww1.sinaimg.cn/large/007vKa8Jgy1g9p3fc17dyj30pa0btq50.jpg" alt="&#x8F6F;&#x4EF6;&#x5B89;&#x88C5;&#x65B9;&#x6CD5;&#x5386;&#x7A0B;.jpg"></p>
<p><code>/etc/apt/sources.list</code> &#x53EA;&#x4F1A;&#x544A;&#x77E5;&#x7CFB;&#x7EDF;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;&#x7684;&#x955C;&#x50CF;&#x7AD9;&#x70B9;&#x5730;&#x5740;&#xFF0C;&#x8FD9;&#x65F6;&#x6BCF;&#x5F53;&#x7CFB;&#x7EDF;&#x6267;&#x884C;&#x4E00;&#x6B21; <code>sudo apt install xxx</code> &#x90FD;&#x8981;&#x94FE;&#x63A5;&#x955C;&#x50CF;&#x7AD9;&#x68C0;&#x7D22;&#x51FA;&#x5BF9;&#x5E94;&#x7684;&#x8F6F;&#x4EF6;&#x5730;&#x5740;&#xFF0C;&#x8FD9;&#x6837;&#x662F;&#x5F88;&#x6D6A;&#x8D39;&#x65F6;&#x95F4;&#x7684;&#xFF0C;&#x6240;&#x4EE5;&#x5728;&#x672C;&#x5730; <code>/var/lib/apt/lists/</code> &#x4F1A;&#x7F13;&#x5B58;&#x4E00;&#x4EFD;&#x955C;&#x50CF;&#x7AD9;&#x91CC;&#x7684;&#x6240;&#x6709;&#x8F6F;&#x4EF6;&#x6E90;&#x4FE1;&#x606F;&#xFF0C;&#x8FD9;&#x6837;&#x6BCF;&#x6B21;&#x6267;&#x884C; <code>sudo apt install xxx</code> &#x76F4;&#x63A5;&#x5728;&#x672C;&#x5730;&#x7F13;&#x51B2;&#x91CC;&#x68C0;&#x7D22;&#xFF0C;&#x5728;&#x8FDE;&#x63A5;&#x7F51;&#x7EDC;&#x4E0B;&#x8F7D;&#x6587;&#x4EF6;&#x3002;&#x6240;&#x4EE5; <code>sudo apt install</code> &#x4F1A;&#x5148;&#x8BBF;&#x95EE; <code>/var/lib/apt/lists/</code>&#xFF1B;&#x800C;&#x4E14; <code>sudo apt update</code> &#x66F4;&#x65B0;&#x7684;&#x662F; <code>/var/lib/apt/lists/</code> &#x91CC;&#x7684;&#x8F6F;&#x4EF6;&#x6E90;</p>
<p>&#x6BCF;&#x5F53;&#x6267;&#x884C;&#x547D;&#x4EE4;&#x8FDB;&#x884C;&#x8F6F;&#x4EF6;&#x7684;&#x5B89;&#x88C5;&#x6216;&#x7740;&#x66F4;&#x65B0;&#xFF0C;&#x6216;&#x8005;&#x8F6F;&#x4EF6;&#x6E90;&#x7684;&#x66F4;&#x65B0;&#x65F6;&#xFF0C;apt &#x4F1A;&#x8BBF;&#x95EE; <code>/etc/apt/sources.list</code> &#x5185;&#x7684;&#x5730;&#x5740;&#xFF0C;&#x5E76;&#x5728;&#x8BE5;&#x7F51;&#x7AD9;&#x4E2D;&#x627E;&#x5230;&#x5BF9;&#x5E94;&#x7CFB;&#x7EDF;&#x7684;&#x5305;&#x4FE1;&#x606F;&#x4F8B;&#x5982;&#x6211;&#x7684;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x662F; ubuntu&#xFF0C;&#x7F51;&#x7AD9;&#x662F; <code>deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse</code> &#x7F51;&#x6613;&#x7684;&#xFF0C;&#x90A3;&#x4E48;&#x5F53;&#x6211;&#x4EEC;&#x6267;&#x884C;&#x5B89;&#x88C5;&#x7684;&#x547D;&#x4EE4;&#x65F6;&#xFF0C;&#x4ED6;&#x5C31;&#x4F1A;&#x5BF9;&#x5E94;&#x7684;&#x8BBF;&#x95EE; <code>http://mirrors.163.com/ubuntu/dists/lucid/main/binary-i386/</code> &#x7684; <code>packages.gz</code>&#xFF0C;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x662F;&#x670D;&#x52A1;&#x5668;&#x4E0A;&#x8F6F;&#x4EF6;&#x5305;&#x53CA;&#x5176;&#x4F9D;&#x8D56;&#x5173;&#x7CFB;&#x7684;&#x6E05;&#x5355;&#xFF0C;&#x5E76;&#x4E14;&#x7528; <code>gzip</code> &#x538B;&#x7F29;&#x8FC7;&#x4E86;&#x3002;<code>apt-get update</code>&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x6E05;&#x5355;&#x6765;&#x786E;&#x5B9A;&#x80FD;&#x591F;&#x83B7;&#x5F97;&#x54EA;&#x4E9B;&#x8865;&#x5145;&#x7684;&#x8F6F;&#x4EF6;&#x5305;&#x4E14;&#x4ED6;&#x7684;&#x5185;&#x5BB9;&#x4F1A;&#x88AB;&#x4FDD;&#x5B58;&#x5728; <code>/var/lib/apt/lists</code> &#x5185;&#xFF0C;&#x901A;&#x8FC7;&#x8BBF;&#x95EE;&#x8FD9;&#x4E2A; lists &#x786E;&#x5B9A;&#x8BE5;&#x8F6F;&#x4EF6;&#x662F;&#x5426;&#x5DF2;&#x5B89;&#x88C5;&#xFF0C;&#x662F;&#x5426;&#x662F;&#x6700;&#x65B0;&#x7248;&#x672C;&#xFF0C;&#x4F9D;&#x8D56;&#x5173;&#x7CFB;&#x662F;&#x5426;&#x6EE1;&#x8DB3;&#xFF0C;&#x4ECE;&#x800C;&#x786E;&#x5B9A;&#x8981;&#x66F4;&#x65B0;&#x5185;&#x5BB9;&#xFF0C;&#x5E76;&#x8FDB;&#x884C;&#x66F4;&#x65B0;&#xFF0C;&#x5176;&#x5B89;&#x88C5;&#x8FC7;&#x7A0B;&#x4E3B;&#x8981;&#x662F;&#x7531; dpkg &#x6765;&#x5B8C;&#x6210;</p>
<h2 id="&#x4E00;&#x3001;-&#x80CC;&#x666F;&#x77E5;&#x8BC6;"><a name="&#x4E00;&#x3001;-&#x80CC;&#x666F;&#x77E5;&#x8BC6;" class="plugin-anchor" href="#&#x4E00;&#x3001;-&#x80CC;&#x666F;&#x77E5;&#x8BC6;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E00;&#x3001; &#x80CC;&#x666F;&#x77E5;&#x8BC6;</h2>
<h3 id="1-ppa-&#x6E90;---personal-package-archives---&#x4E2A;&#x4EBA;&#x8F6F;&#x4EF6;&#x5305;&#x96C6;"><a name="1-ppa-&#x6E90;---personal-package-archives---&#x4E2A;&#x4EBA;&#x8F6F;&#x4EF6;&#x5305;&#x96C6;" class="plugin-anchor" href="#1-ppa-&#x6E90;---personal-package-archives---&#x4E2A;&#x4EBA;&#x8F6F;&#x4EF6;&#x5305;&#x96C6;"><i class="fa fa-link" aria-hidden="true"></i></a>1. PPA &#x6E90; - Personal Package Archives - &#x4E2A;&#x4EBA;&#x8F6F;&#x4EF6;&#x5305;&#x96C6;</h3>
<blockquote>
<p>&#x6E90;&#x548C;&#x8F6F;&#x4EF6;&#x4ED3;&#x5E93;&#x5B9E;&#x9645;&#x4E0A;&#x662F;&#x4E00;&#x4E2A;&#x610F;&#x601D;&#xFF0C;&#x5382;&#x5546;&#x5C06;&#x7F16;&#x8BD1;&#x540E;&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#x548C;&#x8F6F;&#x4EF6;&#x4FE1;&#x606F;&#x5B58;&#x653E;&#x81F3;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x7528;&#x6237;&#x9700;&#x8981;&#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#x65F6;&#xFF0C;&#x5305;&#x7BA1;&#x7406;&#x5668;&#x81EA;&#x52A8;&#x5206;&#x6790;&#x672C;&#x673A;&#x548C;&#x5BB9;&#x5668;&#xFF08;repository&#xFF09;&#x5185;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x4E0B;&#x8F7D;&#x9700;&#x8981;&#x7684;&#x5305;&#x5E76;&#x81EA;&#x52A8;&#x5B89;&#x88C5;&#xFF0C;&#x5B89;&#x88C5;&#x540E;&#x5C06;&#x65B0;&#x5B89;&#x88C5;&#x7684;&#x8F6F;&#x4EF6;&#x4FE1;&#x606F;&#x5B58;&#x653E;&#x81F3;&#x672C;&#x5730;</p>
</blockquote>
<ul>
<li>&#x6DFB;&#x52A0;&#x3001;&#x5220;&#x9664; PPA &#x8F6F;&#x4EF6;&#x6E90;<pre><code class="lang-bash"><span class="hljs-comment"># &#x6DFB;&#x52A0; PPA &#x8F6F;&#x4EF6;&#x6E90;&#x7684;&#x547D;&#x4EE4;</span>
$ sudo add-apt-repository ppa:user/ppa-name
<span class="hljs-comment"># &#x5220;&#x9664; PPA &#x8F6F;&#x4EF6;&#x6E90;&#x7684;&#x547D;&#x4EE4;</span>
$ sudo add-apt-repository --remove ppa:user/ppa-name
</code></pre>
&#x4F8B;&#x5982;&#xFF0C;&#x6211;&#x4EEC;&#x60F3;&#x8981;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A; Wireshark &#x8F6F;&#x4EF6;&#x7684; PPA &#x6E90;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x6839;&#x636E;&#x5B83;&#x5B98;&#x7F51;&#x4E0A;&#x63D0;&#x4F9B;&#x7684;&#x547D;&#x4EE4;&#x6765;&#x8FDB;&#x884C;&#x6DFB;&#x52A0;&#xFF0C;&#x5982;&#x4E0B;&#x56FE;&#x6240;&#x793A;&#xFF1A; </li>
</ul>
<p>&#x5F53;&#x6211;&#x4EEC;&#x6DFB;&#x52A0;&#x5B8C; PPA &#x6E90;&#x4E4B;&#x540E;&#xFF0C;&#x7CFB;&#x7EDF;&#x5C31;&#x4F1A;&#x5728; <code>/etc/apt/sources.list.d/</code> &#x6587;&#x4EF6;&#x5939;&#x91CC;&#x521B;&#x5EFA;&#x4E86;&#x4E24;&#x4E2A;&#x6587;&#x4EF6;&#xFF0C;&#x4E00;&#x4E2A; <code>.list</code> &#x6587;&#x4EF6;&#x548C;&#x4E00;&#x4E2A;&#x5E26;&#x6709; <code>.save</code> &#x540E;&#x7F00;&#x7684;&#x5907;&#x4EFD;&#x6587;&#x4EF6;&#xFF1A;</p>
<pre><code class="lang-shell">$ cd /etc/apt/sources.list.d
$ ls | grep wireshark
wireshark-dev-stable-trusty.list
wireshark-dev-stable-trusty.list.save
</code></pre>
<p>&#x6211;&#x4EEC;&#x518D;&#x6765;&#x6253;&#x5F00;&#x4E00;&#x4E0B; <code>wireshark-dev-stable-trusty.list</code> &#x6587;&#x4EF6;&#x770B;&#x770B;&#x91CC;&#x9762;&#x7684;&#x5185;&#x5BB9;&#x662F;&#x4EC0;&#x4E48;&#xFF1A;</p>
<pre><code>deb http://ppa.launchpad.net/wireshark-dev/stable/ubuntu trusty main
# deb-src http://ppa.launchpad.net/wireshark-dev/stable/ubuntu trusty main
</code></pre><p>&#x539F;&#x6765;&#x6587;&#x4EF6;&#x91CC;&#x5C31;&#x662F;&#x6DFB;&#x52A0;&#x4E86;&#x4E00;&#x4E2A;&#x8DDF;&#x8F6F;&#x4EF6;&#x6E90;&#x4E00;&#x6A21;&#x4E00;&#x6837;&#x7684;&#x4E1C;&#x897F;&#xFF0C;&#x4ED6;&#x4EEC;&#x7684;&#x4F5C;&#x7528;&#x6B8A;&#x9014;&#x540C;&#x5F52;&#x554A;&#x3002;&#x6211;&#x60F3;&#x8FD9;&#x5176;&#x5B9E;&#x662F; Ubuntu &#x4E3A;&#x4E86;&#x5206;&#x8FA8;&#x5B98;&#x65B9;&#x7684;&#x6E90;&#x548C;&#x7B2C;&#x4E09;&#x65B9;&#x7684;&#x6E90;&#x624D;&#x8BBE;&#x8BA1;&#x6210;&#x5728; <code>sources.list</code> &#x548C; <code>sources.list.d/</code> &#x8FD9;&#x4E24;&#x4E2A;&#x5730;&#x65B9;&#x4E2D;&#x5B58;&#x50A8;&#x8F6F;&#x4EF6;&#x6E90;&#x4FE1;&#x606F;&#x3002;&#x56E0;&#x4E3A;&#x7B2C;&#x4E09;&#x65B9;&#x7684;&#x6E90;&#x6BD5;&#x7ADF;&#x4E0D;&#x592A;&#x53EF;&#x4FE1;&#xFF0C;&#x5982;&#x679C;&#x968F;&#x4FBF;&#x66F4;&#x65B0;&#x7684;&#x8BDD;&#x53EF;&#x662F;&#x4F1A;&#x51FA;&#x4E8B;&#x60C5;&#x7684;&#x3002;</p>
<h3 id="2-deb-httpsiteexamplecomdebian-distribution-component-&#x683C;&#x5F0F;&#x8BE6;&#x89E3;"><a name="2-deb-httpsiteexamplecomdebian-distribution-component-&#x683C;&#x5F0F;&#x8BE6;&#x89E3;" class="plugin-anchor" href="#2-deb-httpsiteexamplecomdebian-distribution-component-&#x683C;&#x5F0F;&#x8BE6;&#x89E3;"><i class="fa fa-link" aria-hidden="true"></i></a>2. <code>deb http://site.example.com/debian distribution component</code> &#x683C;&#x5F0F;&#x8BE6;&#x89E3;</h3>
<pre><code class="lang-shell">deb http://site.example.com/debian distribution component1 component2 component3
deb-src http://site.example.com/debian distribution component1 component2 component3
# &#x4F8B;&#x5982;
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ bionic restricted universe multiverse main
</code></pre>
<ol>
<li><p>&#x6863;&#x6848;&#x7C7B;&#x578B; - Archive type</p>
</li>
<li><p>&#x6761;&#x76EE;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x8BCD; deb &#x6216;&#x662F; deb-src &#x8868;&#x660E;&#x4E86;&#x6240;&#x83B7;&#x53D6;&#x7684;&#x8F6F;&#x4EF6;&#x5305;&#x6863;&#x6848;&#x7C7B;&#x578B;</p>
<ul>
<li>deb - &#x6863;&#x6848;&#x7C7B;&#x578B;&#x4E3A;&#x4E8C;&#x8FDB;&#x5236;&#x9884;&#x7F16;&#x8BD1;&#x8F6F;&#x4EF6;&#x5305;&#xFF0C;&#x4E00;&#x822C;&#x6211;&#x4EEC;&#x6240;&#x7528;&#x7684;&#x6863;&#x6848;&#x7C7B;&#x578B;</li>
<li>deb-src - &#x6863;&#x6848;&#x7C7B;&#x578B;&#x4E3A;&#x7528;&#x4E8E;&#x7F16;&#x8BD1;&#x4E8C;&#x8FDB;&#x5236;&#x8F6F;&#x4EF6;&#x5305;&#x7684;&#x6E90;&#x4EE3;&#x7801;</li>
</ul>
</li>
</ol>
<blockquote>
<p>&#x6BCF;&#x884C;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x5355;&#x8BCD; deb &#x6216; deb-src&#xFF0C;&#x63CF;&#x8FF0;&#x4E86;&#x6587;&#x4EF6;&#x7C7B;&#x578B;&#xFF0C;&#x76EE;&#x5F55;&#x4E2D;&#x5305;&#x542B;&#x7684;&#x662F;&#x4E8C;&#x8FDB;&#x5236;&#x8F6F;&#x4EF6;&#x5305;&#xFF08; deb &#xFF09;&#xFF0C;&#x5373;&#x6211;&#x4EEC;&#x901A;&#x5E38;&#x4F7F;&#x7528;&#x7684;&#x5DF2;&#x7F16;&#x8BD1;&#x597D;&#x7684;&#x8F6F;&#x4EF6;&#x5305;&#xFF1B;&#x6216;&#x5305;&#x542B;&#x7684;&#x662F;&#x6E90;&#x7801;&#x5305;&#xFF08; deb-src &#xFF09;&#xFF0C;&#x6E90;&#x7801;&#x5305;&#x5305;&#x542B;&#x6E90;&#x7A0B;&#x5E8F;&#x7F16;&#x7801;&#x3001;Debian &#x7BA1;&#x7406;&#x6587;&#x4EF6;&#xFF08; .dsc &#xFF09;&#x548C; &#x201C;Debian &#x5316;&#x201D; &#x8BE5;&#x7A0B;&#x5E8F;&#x6240;&#x505A;&#x66F4;&#x6539;&#x7684;&#x8BB0;&#x5F55;&#x6587;&#x4EF6; diff.gz</p>
</blockquote>
<ol>
<li><p>&#x4ED3;&#x5E93;&#x5730;&#x5740; - Repository URL</p>
</li>
<li><p>&#x6761;&#x76EE;&#x7684;&#x7B2C;&#x4E8C;&#x4E2A;&#x8BCD;&#x5219;&#x662F;&#x8F6F;&#x4EF6;&#x5305;&#x6240;&#x5728;&#x4ED3;&#x5E93;&#x7684;&#x5730;&#x5740;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x66F4;&#x6362;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#x4E3A;&#x5176;&#x4ED6;&#x5730;&#x7406;&#x4F4D;&#x7F6E;&#x66F4;&#x9760;&#x8FD1;&#x81EA;&#x5DF1;&#x7684;&#x955C;&#x50CF;&#x6765;&#x63D0;&#x9AD8;&#x4E0B;&#x8F7D;&#x901F;&#x5EA6;</p>
<ul>
<li>Ubuntu &#x8F6F;&#x4EF6;&#x6E90;&#x7684;&#x6E90;&#x5217;&#x8868;&#xFF1A;<a href="https://segmentfault.com/a/1190000000375848" target="_blank">&#x56FD;&#x5185;&#x5F00;&#x6E90;&#x955C;&#x50CF;&#x7AD9;&#x70B9;&#x6C47;&#x603B;</a></li>
</ul>
</li>
<li>&#x4ED3;&#x5E93;&#x5730;&#x5740;&#x53EF;&#x4EE5;&#x662F;&#x591A;&#x79CD;&#x7C7B;&#x578B;&#xFF1A;http&#x3001;ftp&#x3001;file&#xFF08; &#x672C;&#x5730;&#x6587;&#x4EF6;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;&#x4E00;&#x4E2A;&#x52A0;&#x8F7D;&#x4E86; ISO9600 &#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7684;&#x76EE;&#x5F55; &#xFF09; &#x6216; ssh </li>
</ol>
<ol>
<li><p>&#x53D1;&#x884C;&#x7248; - Distribution</p>
</li>
<li><p>&#x8DDF;&#x5728;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#x540E;&#x7684;&#x662F;&#x53D1;&#x884C;&#x7248;&#x3002;&#x53D1;&#x884C;&#x7248;&#x6709;&#x4E24;&#x79CD;&#x5206;&#x7C7B;&#x65B9;&#x6CD5;</p>
<ul>
<li>&#x4E00;&#x7C7B;&#x662F;&#x53D1;&#x884C;&#x7248;&#x7684;&#x5177;&#x4F53;&#x4EE3;&#x53F7;&#xFF0C;&#x5982; xenial,trusty, precise &#x7B49;</li>
<li>&#x53E6;&#x4E00;&#x7C7B;&#x5219;&#x662F;&#x53D1;&#x884C;&#x7248;&#x7684;&#x53D1;&#x884C;&#x7C7B;&#x578B;&#xFF0C;&#x5982; oldstable, stable, testing &#x548C; unstable</li>
</ul>
</li>
<li>&#x53E6;&#x5916;&#xFF0C;&#x5728;&#x53D1;&#x884C;&#x7248;&#x540E;&#x8FD8;&#x53EF;&#x80FD;&#x6709;&#x8FDB;&#x4E00;&#x6B65;&#x7684;&#x6307;&#x5B9A;&#xFF0C;&#x5982; xenial-updates, trusty-security, stable-backports &#x7B49;</li>
</ol>
<blockquote>
<ul>
<li>&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x547D;&#x4EE4; <code>lsb_release -cs</code>,&#x67E5;&#x770B;&#x5F53;&#x524D;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x4EE3;&#x53F7;, &#x4F8B;&#x5982; Ubuntu 16.04 LTS &#x4EE3;&#x53F7;&#x4E3A; xenial, Ubuntu 18.04 LTS &#x4EE3;&#x53F7;&#x4E3A; bionic</li>
</ul>
</blockquote>
<pre><code class="lang-shell">$ lsb_release -ca
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:    bionic
</code></pre>
<ol>
<li><p>&#x8F6F;&#x4EF6;&#x5305;&#x5206;&#x7C7B; - Component</p>
</li>
<li><p>&#x8DDF;&#x5728;&#x53D1;&#x884C;&#x7248;&#x4E4B;&#x540E;&#x7684;&#x5C31;&#x662F;&#x8F6F;&#x4EF6;&#x5305;&#x7684;&#x5177;&#x4F53;&#x5206;&#x7C7B;&#x4E86;&#xFF0C;&#x53EF;&#x4EE5;&#x6709;&#x4E00;&#x4E2A;&#x6216;&#x591A;&#x4E2A;&#x3002;&#x4E0D;&#x540C;&#x7684; Linux &#x53D1;&#x884C;&#x7248;&#x5BF9;&#x8F6F;&#x4EF6;&#x6709;&#x7740;&#x4E0D;&#x540C;&#x7684;&#x5206;&#x7C7B;</p>
</li>
</ol>
<p><strong>Debian</strong></p>
<ul>
<li>main<ul>
<li>&#x5305;&#x542B;&#x7B26;&#x5408; DFSG &#x6307;&#x5BFC;&#x539F;&#x5219;&#x7684;&#x81EA;&#x7531;&#x8F6F;&#x4EF6;&#x5305;&#xFF0C;&#x800C;&#x4E14;&#x8FD9;&#x4E9B;&#x8F6F;&#x4EF6;&#x5305;&#x4E0D;&#x4F9D;&#x8D56;&#x4E0D;&#x7B26;&#x5408;&#x8BE5;&#x6307;&#x5BFC;&#x539F;&#x5219;&#x7684;&#x8F6F;&#x4EF6;&#x5305;&#x3002;&#x8FD9;&#x4E9B;&#x8F6F;&#x4EF6;&#x5305;&#x88AB;&#x89C6;&#x4E3A; Debian &#x53D1;&#x578B;&#x7248;&#x7684;&#x4E00;&#x90E8;&#x5206;</li>
</ul>
</li>
<li>contrib<ul>
<li>&#x5305;&#x542B;&#x7B26;&#x5408; DFSG &#x6307;&#x5BFC;&#x539F;&#x5219;&#x7684;&#x81EA;&#x7531;&#x8F6F;&#x4EF6;&#x5305;&#xFF0C;&#x4E0D;&#x8FC7;&#x8FD9;&#x4E9B;&#x8F6F;&#x4EF6;&#x5305;&#x4F9D;&#x8D56;&#x4E0D;&#x5728; main &#x5206;&#x7C7B;&#x4E2D;&#x7684;&#x8F6F;&#x4EF6;&#x5305;</li>
</ul>
</li>
<li>non-free<ul>
<li>&#x5305;&#x542B;&#x4E0D;&#x7B26;&#x5408; DFSG &#x6307;&#x5BFC;&#x539F;&#x5219;&#x7684;&#x975E;&#x81EA;&#x7531;&#x8F6F;&#x4EF6;&#x5305;</li>
</ul>
</li>
</ul>
<p><strong>Ubuntu</strong></p>
<ul>
<li>main<ul>
<li>&#x5B98;&#x65B9;&#x652F;&#x6301;&#x7684;&#x81EA;&#x7531;&#x8F6F;&#x4EF6;</li>
</ul>
</li>
<li>restricted<ul>
<li>&#x5B98;&#x65B9;&#x652F;&#x6301;&#x7684;&#x975E;&#x5B8C;&#x5168;&#x81EA;&#x7531;&#x7684;&#x8F6F;&#x4EF6;</li>
</ul>
</li>
<li>universe<ul>
<li>&#x793E;&#x533A;&#x7EF4;&#x62A4;&#x7684;&#x81EA;&#x7531;&#x8F6F;&#x4EF6;</li>
</ul>
</li>
<li>multiverse<ul>
<li>&#x975E;&#x81EA;&#x7531;&#x8F6F;&#x4EF6;</li>
</ul>
</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:center">Ubuntu</th>
<th style="text-align:center">&#x81EA;&#x7531;&#x8F6F;&#x4EF6;</th>
<th style="text-align:center">&#x975E;&#x81EA;&#x7531;&#x8F6F;&#x4EF6;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">&#x5B98;&#x65B9;&#x652F;&#x6301;</td>
<td style="text-align:center">Main</td>
<td style="text-align:center">Restricted</td>
</tr>
<tr>
<td style="text-align:center">&#x975E;&#x5B98;&#x65B9;&#x652F;&#x6301;</td>
<td style="text-align:center">Universe</td>
<td style="text-align:center">Multiverse</td>
</tr>
</tbody>
</table>
<h2 id="&#x4E8C;&#x3001;-apt-&#x57FA;&#x672C;&#x547D;&#x4EE4;"><a name="&#x4E8C;&#x3001;-apt-&#x57FA;&#x672C;&#x547D;&#x4EE4;" class="plugin-anchor" href="#&#x4E8C;&#x3001;-apt-&#x57FA;&#x672C;&#x547D;&#x4EE4;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E8C;&#x3001; apt &#x57FA;&#x672C;&#x547D;&#x4EE4;</h2>
<ul>
<li><p><strong><code>apt [&#x9009;&#x9879;] &#x547D;&#x4EE4;</code></strong></p>
</li>
<li><p><strong><code>[&#x9009;&#x9879;]</code></strong></p>
<ul>
<li><code>list</code> - &#x6839;&#x636E;&#x540D;&#x79F0;&#x5217;&#x51FA;&#x8F6F;&#x4EF6;&#x5305;</li>
<li><code>search</code> - &#x641C;&#x7D22;&#x8F6F;&#x4EF6;&#x5305;&#x63CF;&#x8FF0;</li>
<li><code>show</code> - &#x663E;&#x793A;&#x8F6F;&#x4EF6;&#x5305;&#x7EC6;&#x8282;</li>
<li><code>install</code> - &#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#x5305;</li>
<li><code>remove</code> - &#x79FB;&#x9664;&#x8F6F;&#x4EF6;&#x5305;</li>
<li><code>autoremove</code> - &#x5378;&#x8F7D;&#x6240;&#x6709;&#x81EA;&#x52A8;&#x5B89;&#x88C5;&#x4E14;&#x4E0D;&#x518D;&#x4F7F;&#x7528;&#x7684;&#x8F6F;&#x4EF6;</li>
<li><code>update</code> - &#x6839;&#x636E; <code>/etc/apt/sources.list</code> &#x66F4;&#x65B0; <code>/var/lib/apt/lists</code> &#x8F6F;&#x4EF6;&#x5305;&#x5217;&#x8868;</li>
<li><code>upgrade</code> - &#x6839;&#x636E; <code>/var/lib/apt/lists</code> &#x5B89;&#x88C5;/&#x5347;&#x7EA7; &#x8F6F;&#x4EF6;&#x6765;&#x66F4;&#x65B0;&#x7CFB;&#x7EDF;</li>
<li><code>full-upgrade</code> - &#x901A;&#x8FC7; &#x5378;&#x8F7D;/&#x5B89;&#x88C5;/&#x5347;&#x7EA7; &#x6765;&#x66F4;&#x65B0;&#x7CFB;&#x7EDF;</li>
<li><code>edit-sources</code> - &#x7F16;&#x8F91;&#x8F6F;&#x4EF6;&#x6E90;&#x4FE1;&#x606F;&#x6587;&#x4EF6;</li>
</ul>
</li>
</ul>
<p><strong><code>&#x6DFB;&#x52A0; PPA &#x8F6F;&#x4EF6;&#x6E90;&#x5E76;&#x5B89;&#x88C5;</code></strong></p>
<pre><code class="lang-bash">$ sudo add-apt-repository &lt;PPA_info&gt;            <span class="hljs-comment"># &#x6B64;&#x547D;&#x4EE4;&#x5C06; PPA &#x4ED3;&#x5E93;&#x6DFB;&#x52A0;&#x5230;&#x5217;&#x8868;&#x4E2D;</span>
$ sudo apt-get update     <span class="hljs-comment"># &#x6B64;&#x547D;&#x4EE4;&#x66F4;&#x65B0;&#x53EF;&#x4EE5;&#x5728;&#x5F53;&#x524D;&#x7CFB;&#x7EDF;&#x4E0A;&#x5B89;&#x88C5;&#x7684;&#x8F6F;&#x4EF6;&#x5305;&#x5217;&#x8868;</span>
$ sudo apt-get install &lt;package_<span class="hljs-keyword">in</span>_PPA&gt;       <span class="hljs-comment"># &#x6B64;&#x547D;&#x4EE4;&#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#x5305;</span>

<span class="hljs-comment"># &#x4F8B;&#x5982;</span>
$ sudo add-apt-repository ppa:dr-akulavich/lighttable
$ sudo apt-get update
$ sudo apt-get install lighttable-installer
</code></pre>
<p><strong><code>&#x5F3A;&#x5236;&#x91CD;&#x88C5;&#x5DF2;&#x5B89;&#x88C5;&#x7684;&#x8F6F;&#x4EF6;</code></strong></p>
<pre><code class="lang-bash"> $ sudo apt-get --reinstall install &lt;package-name&gt;
 <span class="hljs-comment"># &#x4F1A;&#x5148;&#x5220;&#x9664;&#x8F6F;&#x4EF6;&#xFF0C;&#x518D;&#x5B89;&#x88C5;</span>
</code></pre>
<p><strong><code>sudo apt install \&lt;package-name\&gt; &#x65B0;&#x589E;&#x6587;&#x4EF6;&#x4F4D;&#x7F6E;</code></strong></p>
<ul>
<li>&#x4E3B;&#x8981;&#x5206;&#x6563;&#x5230;&#x4EE5;&#x4E0B;&#x56DB;&#x4E2A;&#x76EE;&#x5F55;<ul>
<li><code>/usr/bin</code> - &#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;</li>
<li><code>/usr/lib</code> - &#x52A8;&#x6001;&#x51FD;&#x6570;&#x5E93;&#x6587;&#x4EF6;</li>
<li><code>/usr/share/doc</code> - &#x4F7F;&#x7528;&#x624B;&#x518C;</li>
<li><code>/usr/share/man</code> - man page</li>
</ul>
</li>
<li>&#x6240;&#x4EE5;&#x5728;&#x591A;&#x7528;&#x6237;&#x60C5;&#x51B5;&#x4E0B;&#x4F7F;&#x7528; <code>sudo apt install &lt;package-name&gt;</code> &#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#xFF0C;&#x4F1A;&#x9020;&#x6210;&#x8F6F;&#x4EF6;&#x5B58;&#x653E;&#x6563;&#x4E71;&#xFF0C;&#x5BFB;&#x627E;&#x8F6F;&#x4EF6;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x9EBB;&#x70E6;&#xFF1B;&#x4F46;&#x597D;&#x5904;&#x662F; apt &#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#x7CFB;&#x7EDF;&#x4F1A;&#x81EA;&#x52A8;&#x6CE8;&#x518C;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#xFF0C;&#x4E14;&#x662F;&#x5168;&#x5C40;&#x7684;</li>
<li>&#x5F53;&#x81EA;&#x5DF1;&#x4F7F;&#x7528;&#x6E90;&#x7801;&#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#x901A;&#x5E38;&#x628A;&#x6E90;&#x7801;&#x5305;&#x653E;&#x5728; <code>/usr/local</code></li>
</ul>
<p><strong><code>sudo apt update &#x5177;&#x4F53;&#x6267;&#x884C;&#x52A8;&#x4F5C;</code></strong></p>
<ul>
<li>&#x6267;&#x884C; <code>sudo apt update</code></li>
<li>&#x94FE;&#x63A5; <code>/etc/apt/sources.list</code> &#x91CC;&#x7684;&#x8F6F;&#x4EF6;&#x6E90;&#x7684;&#x955C;&#x50CF;&#x7AD9;&#xFF0C;&#x81EA;&#x52A8;&#x68C0;&#x7D22;&#x5BF9;&#x6BD4;&#x955C;&#x50CF;&#x7AD9;&#x91CC;&#x7684;&#x6240;&#x6709;&#x8F6F;&#x4EF6;&#x6E90;&#x4E0E;&#x672C;&#x5730;&#x7684; <code>/var/lib/apt/lists/</code> &#x76EE;&#x5F55;&#xFF0C;&#x82E5;&#x53D1;&#x73B0;&#x6709;&#x66F4;&#x65B0;&#xFF0C;&#x7ACB;&#x5373;&#x5728; <code>/var/lib/apt/lists/</code> &#x76EE;&#x5F55;&#x91CC;&#x8DDF;&#x65B0;</li>
<li>&#x66F4;&#x65B0;&#x5B8C;&#x6BD5;</li>
</ul>
<p><strong><code>&#x5F3A;&#x5236;&#x66F4;&#x65B0;</code></strong></p>
<pre><code class="lang-shell">sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
</code></pre>
<h2 id="3-sudo-apt-autoremove"><a name="3-sudo-apt-autoremove" class="plugin-anchor" href="#3-sudo-apt-autoremove"><i class="fa fa-link" aria-hidden="true"></i></a>3. <code>sudo apt autoremove</code></h2>
<p><code>autoclean</code> &#x662F;&#x53E6;&#x4E00;&#x79CD;&#x65B9;&#x6CD5;&#xFF0C;&#x7528;&#x4E8E;&#x6E05;&#x9664;&#x4E0B;&#x8F7D;&#x7684;&#x5305;&#x6587;&#x4EF6;&#x7684;&#x672C;&#x5730;&#x5B58;&#x50A8;&#x5E93;&#xFF0C;clean &#x548C;&#x4E4B;&#x95F4;&#x7684;&#x533A;&#x522B;&#x5728;&#x4E8E;autoclean&#x540E;&#x8005;&#x4EC5;&#x5220;&#x9664;&#x65E0;&#x6CD5;&#x518D;&#x4ECE;&#x5176;&#x6E90;&#x4E0B;&#x8F7D;&#x7684;&#x5305;&#x6587;&#x4EF6;&#xFF0C;&#x5E76;&#x4E14;&#x5F88;&#x53EF;&#x80FD;&#x65E0;&#x7528;</p>
<h2 id="4-etcapt-&#x76EE;&#x5F55;&#x8BE6;&#x89E3;"><a name="4-etcapt-&#x76EE;&#x5F55;&#x8BE6;&#x89E3;" class="plugin-anchor" href="#4-etcapt-&#x76EE;&#x5F55;&#x8BE6;&#x89E3;"><i class="fa fa-link" aria-hidden="true"></i></a>4. <code>/etc/apt/</code> &#x76EE;&#x5F55;&#x8BE6;&#x89E3;</h2>
<div align="center">
<img src="images/etc-apt&#x76EE;&#x5F55;.jpg"><br>/etc/apt &#x76EE;&#x5F55;&#x8BE6;&#x89E3;&#x56FE;
</div>

<h3 id="etcaptsourceslist--etcaptsourceslistd"><a name="etcaptsourceslist--etcaptsourceslistd" class="plugin-anchor" href="#etcaptsourceslist--etcaptsourceslistd"><i class="fa fa-link" aria-hidden="true"></i></a><code>/etc/apt/sources.list</code> &amp;&amp; <code>/etc/apt/sources.list.d/</code></h3>
<h4 id="etcaptsourceslist&#x5185;&#x5BB9;&#x7EC4;&#x6210;"><a name="etcaptsourceslist&#x5185;&#x5BB9;&#x7EC4;&#x6210;" class="plugin-anchor" href="#etcaptsourceslist&#x5185;&#x5BB9;&#x7EC4;&#x6210;"><i class="fa fa-link" aria-hidden="true"></i></a><code>/etc/apt/sources.list</code>&#x5185;&#x5BB9;&#x7EC4;&#x6210;</h4>
<div align="center">
<img src="images/etcaptsources.list.jpg"><br>/etc/apt/sources.list &#x6587;&#x4EF6;
</div>

<ul>
<li>&#x5F53;&#x4F7F;&#x7528;<code>sudo apt install xxx</code>&#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#x65F6;&#xFF0C;&#x7CFB;&#x7EDF;&#x4F1A;&#x81EA;&#x52A8;&#x5728;&#x914D;&#x7F6E;&#x7684;&#x955C;&#x50CF;&#x8F6F;&#x4EF6;&#x6E90;&#x5217;&#x8868;&#xFF08; /var/lib/apt/lists/ )&#x5BFB;&#x627E;&#xFF0C;&#x627E;&#x5230;&#x540E;&#x81EA;&#x52A8;&#x6DFB;&#x52A0;&#x8FDB;&#x6765;</li>
</ul>
<h4 id="etcaptsourceslistd&#x5185;&#x5BB9;&#x7EC4;&#x6210;"><a name="etcaptsourceslistd&#x5185;&#x5BB9;&#x7EC4;&#x6210;" class="plugin-anchor" href="#etcaptsourceslistd&#x5185;&#x5BB9;&#x7EC4;&#x6210;"><i class="fa fa-link" aria-hidden="true"></i></a><code>/etc/apt/sources.list.d/</code>&#x5185;&#x5BB9;&#x7EC4;&#x6210;</h4>
<div align="center">
<img src="images/sources.list.d.jpg"><br>/etc/apt/sources.list.d/ &#x6587;&#x4EF6;&#x5939;
</div>

<ul>
<li><code>/etc/apt/sources.list.d/</code>&#x591A;&#x662F;&#x7531;&#x7B2C;&#x4E09;&#x65B9;&#x8F6F;&#x4EF6;&#x6E90;&#x6587;&#x4EF6;&#x7EC4;&#x6210;&#xFF0C;&#x6BD4;&#x5982;&#x4F7F;&#x7528;<code>sudo dpkg -i xxx.deb</code>&#x5B89;&#x88C5;&#x6216;&#x901A;&#x8FC7;&#x6DFB;&#x52A0; PPA &#x8F6F;&#x4EF6;&#x7B2C;&#x4E09;&#x65B9;&#x6E90;<code>sudo add-apt-repository ppa:user/ppa-name</code>&#x5B89;&#x88C5;&#xFF0C;&#x800C;&#x8FD9;&#x4E9B;&#x6587;&#x4EF6;&#x4E3B;&#x8981;&#x6709;&#x8FD9;&#x4E48;&#x4E09;&#x79CD;&#xFF1A;</li>
</ul>
<pre><code>xxx.list
xxx.list.distUpgrade
xxx.list.save
</code></pre><blockquote>
<ol>
<li><p>xxx.list - &#x8BB0;&#x5F55;&#x7B2C;&#x4E09;&#x65B9;&#x8F6F;&#x4EF6;&#x7684;&#x8F6F;&#x4EF6;&#x6E90;&#x4FE1;&#x606F;</p>
<pre><code class="lang-shell">### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main # &#x5DF2;&#x7981;&#x6B62;&#x5347;&#x7EA7;&#x5230; bionic
</code></pre>
</li>
<li><p>xxx.list.save - &#x662F;<code>xxx.list.save</code>&#x7684;&#x5907;&#x4EFD;&#xFF0C;&#x5185;&#x5BB9;&#x76F8;&#x540C;</p>
</li>
<li>xxx.list.disUpgrade - &#x7F51;&#x4E0A;&#x6CA1;&#x627E;&#x5230;&#xFF0C;&#x672A;&#x77E5;&#x5F85;&#x7EED;</li>
</ol>
</blockquote>
<pre><code class="lang-shell">### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
</code></pre>
<h3 id="etcaptaptconf--etcaptaptconfd"><a name="etcaptaptconf--etcaptaptconfd" class="plugin-anchor" href="#etcaptaptconf--etcaptaptconfd"><i class="fa fa-link" aria-hidden="true"></i></a><code>/etc/apt/apt.conf</code> &amp;&amp; <code>/etc/apt/apt.conf.d/</code></h3>
<p>/etc/apt/apt.conf:APT&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x3002;</p>
<p>/etc/apt/apt.conf.d/:APT&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7247;&#x6BB5;&#x3002;</p>
<h3 id="etcaptpreferences"><a name="etcaptpreferences" class="plugin-anchor" href="#etcaptpreferences"><i class="fa fa-link" aria-hidden="true"></i></a><code>/etc/apt/preferences</code></h3>
<p>&#x7248;&#x672C;&#x9996;&#x9009;&#x9879;&#x6587;&#x4EF6;&#x3002;&#x60A8;&#x53EF;&#x4EE5;&#x5728;&#x6B64;&#x5904;&#x6307;&#x5B9A;&#x201C; &#x56FA;&#x5B9A; &#x201D;&#xFF0C;&#x5373;&#x4ECE;&#x5355;&#x72EC;&#x7684;&#x6E90;&#x6216;&#x4E0D;&#x540C;&#x7248;&#x672C;&#x7684;&#x5206;&#x53D1;&#x4E2D;&#x83B7;&#x53D6;&#x67D0;&#x4E9B;&#x5305;&#x7684;&#x9996;&#x9009;&#x9879;&#x3002;</p>
<h2 id="5-varcacheapt"><a name="5-varcacheapt" class="plugin-anchor" href="#5-varcacheapt"><i class="fa fa-link" aria-hidden="true"></i></a>5. <code>/var/cache/apt/</code></h2>
<h3 id="varcacheaptarchives"><a name="varcacheaptarchives" class="plugin-anchor" href="#varcacheaptarchives"><i class="fa fa-link" aria-hidden="true"></i></a><code>/var/cache/apt/archives/</code></h3>
<p>&#x68C0;&#x7D22;&#x5230;&#x7684;&#x5305;&#x6587;&#x4EF6;&#x7684;&#x5B58;&#x50A8;&#x533A;&#x57DF;</p>
<p><code>$ sudo apt clean</code>&#x6E05;&#x7A7A;&#x6B64;&#x76EE;&#x5F55;</p>
<p>APT&#x7F13;&#x5B58;&#x6587;&#x4EF6;&#xFF0C;&#x76EE;&#x5F55;&#x662F;&#x5728;&#x7528; apt-get install &#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#x65F6;&#xFF0C;&#x8F6F;&#x4EF6;&#x5305;&#x7684;&#x4E34;&#x65F6;&#x5B58;&#x653E;&#x8DEF;&#x5F84;</p>
<h3 id="varcacheaptarchivespartial"><a name="varcacheaptarchivespartial" class="plugin-anchor" href="#varcacheaptarchivespartial"><i class="fa fa-link" aria-hidden="true"></i></a><code>/var/cache/apt/archives/partial/</code></h3>
<p>&#x4F20;&#x8F93;&#x4E2D;&#x7684;&#x5305;&#x6587;&#x4EF6;&#x7684;&#x5B58;&#x50A8;&#x533A;&#x57DF;&#x3002;</p>
<h3 id="varlibaptlists"><a name="varlibaptlists" class="plugin-anchor" href="#varlibaptlists"><i class="fa fa-link" aria-hidden="true"></i></a><code>/var/lib/apt/lists/</code></h3>
<p>sources.list&#x4E2D;&#x6307;&#x5B9A;&#x7684;&#x6BCF;&#x4E2A;&#x5305;&#x8D44;&#x6E90;&#x7684;&#x72B6;&#x6001;&#x4FE1;&#x606F;&#x7684;&#x5B58;&#x50A8;&#x533A;&#x57DF;</p>
<h3 id="var-libaptlistspartial"><a name="var-libaptlistspartial" class="plugin-anchor" href="#var-libaptlistspartial"><i class="fa fa-link" aria-hidden="true"></i></a><code>/var/ lib/apt/lists/partial/</code></h3>
<p>&#x4F20;&#x8F93;&#x4E2D;&#x7684;&#x72B6;&#x6001;&#x4FE1;&#x606F;&#x7684;&#x5B58;&#x50A8;&#x533A;&#x57DF;&#x3002;</p>
<h3 id="varlibdpkgavailable"><a name="varlibdpkgavailable" class="plugin-anchor" href="#varlibdpkgavailable"><i class="fa fa-link" aria-hidden="true"></i></a><code>/var/lib/dpkg/available</code></h3>
<p>&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;&#x662F;&#x8F6F;&#x4EF6;&#x5305;&#x7684;&#x63CF;&#x8FF0;&#x4FE1;&#x606F;&#xFF0C;&#x8BE5;&#x8F6F;&#x4EF6;&#x5305;&#x62EC;&#x5F53;&#x524D;&#x7CFB;&#x7EDF;&#x6240;&#x4F7F;&#x7528;&#x7684;&#x5B89;&#x88C5;&#x6E90;&#x4E2D;&#x7684;&#x6240;&#x6709;&#x8F6F;&#x4EF6;&#x5305;&#xFF0C;&#x5176;&#x4E2D;&#x5305;&#x62EC;&#x5F53;&#x524D;&#x7CFB;&#x7EDF;&#x4E2D;&#x5DF2;&#x5B89;&#x88C5;&#x7684;&#x548C;&#x672A;&#x5B89;&#x88C5;&#x7684;&#x8F6F;&#x4EF6;&#x5305;</p>
<footer class="page-footer-ex"> <span class="page-footer-ex-copyright"> <a href="https://github.com/Xiechengqi" target="_blank">Xiechengqi</a> </span> &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; <span class="page-footer-ex-footer-update"> <strong>&#x6700;&#x65B0;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;</strong> 2020-01-04 15:54:38 </span> </footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="Linux各种安装下载慢解决方法.html" class="navigation navigation-prev " aria-label="Previous page: Linux各种安装下载慢解决方法">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Linux主机、虚拟机和docker网络配置.html" class="navigation navigation-next " aria-label="Next page: Linux 主机、虚拟机和docker网络配置">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"APT 原理剖析、详解","level":"1.4.5","depth":2,"next":{"title":"Linux 主机、虚拟机和docker网络配置","level":"1.4.6","depth":2,"path":"Linux/Linux主机、虚拟机和docker网络配置.md","ref":"Linux/Linux主机、虚拟机和docker网络配置.md","articles":[]},"previous":{"title":"Linux各种安装下载慢解决方法","level":"1.4.4","depth":2,"path":"Linux/Linux各种安装下载慢解决方法.md","ref":"Linux/Linux各种安装下载慢解决方法.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","-livereload","-sharing","expandable-chapters","popup","pageview-count","code","back-to-top-button","hide-element","github-buttons","github","splitter","search-pro","anchors","page-footer-ex","advanced-emoji","sharing-plus"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"github":{"url":"https://github.com/Xiechengqi/LearningNotes"},"page-footer-ex":{"copyright":"[Xiechengqi](https://github.com/Xiechengqi)","markdown":true,"update_format":"YYYY-MM-DD HH:mm:ss","update_label":"<strong>最新修订时间：</strong>"},"splitter":{},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"buttons":[{"user":"Xiechengqi","repo":"LearningNotes","type":"star","size":"small","count":true}]},"advanced-emoji":{"embedEmojis":false},"sharing":{"qq":false,"douban":false,"facebook":false,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":false,"vk":false,"pocket":false,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"expandable-chapters":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"日常学习笔记","language":"zh-hans","gitbook":"*","description":"日常学习笔记"},"file":{"path":"Linux/APT-剖析详解.md","mtime":"2020-01-04T07:54:38.896Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-03-28T02:57:41.582Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

